<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Project Group List</title>
    </head>
    <body>
        <div class="nav">
	<g:if test="${session.user.role.name == 'Organiser'}"> 
            <span class="menuButton"><g:link class="home" action="organiser">Home</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">New Project</g:link></span>
        </g:if>
	<g:if test="${session.user.role.name == 'Supervisor'}"> 
            <span class="menuButton"><g:link class="home" action="organiser">Home</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">New Project</g:link></span>
        </g:if>
	<g:if test="${session.user.role.name == 'Student'}"> 
            <span class="menuButton"><g:link class="home" action="organiser">Home</g:link></span>
            <span class="menuButton"><g:link class="create" controller="allocation" action="create">Choose Project</g:link></span>
        </g:if>
	</div>
        <div class="body">
            <br>
	    <h1>Project Group List</h1>
            <br>
	    <br>
	    <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>

		<g:each in="${projectGroupList}" status="i" var="projectGroup">
               		<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

                	<table border="3">
			<tr>
			<td align="center"><g:link controller="project" action="projectByTitle">${fieldValue(bean:project, field:group)}</g:link></td>
			</tr>
			<tr>
			</table>
		</g:each>
                <br>
		<br> 
        </div>
    </body>
</html>
